<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>列表样式和伪类选择器</title>
  <style>
    #u1 li {
      list-style: none;
    }
    #u1 li:nth-child(odd) {
      background: #eee;
    }
    #u1 li:hover {
      background: #393;
    }
    /*超链接的默认状态*/
    a.ta:link {
      color:#933;
      text-decoration: none;
    }
    a.ta:visited {
      color:#c55;
    }
    a.ta:hover {
      text-decoration: underline;
      background: #aaa;
      color:#fff;
    }
    
  </style>
</head>
<body>
  <ul id="u1">
    <li><a href="#u01" class="ta">测试链接</a></li>
    <li><a href="#u02" class="ta">测试链接</a></li>
    <li><a href="#u03" class="ta">测试链接</a></li>
    <li><a href="#u04" class="ta">测试链接</a></li>
    <li><a href="#u05" class="ta">测试链接</a></li>
  </ul>
</body>
</html>